[MUSIC] Hello and welcome to this demonstration on
making flow chart decisions using a flow decision activity. In this video, you will learn to create
a workflow that will ask the user to input the age and display the eligibility
to vote or not in a message box. So let's begin, search for a flow chart
activity in the activities panel and drag and drop it in the designer panel. Rename the flow chart activity
as decisions and flow chart. And add an annotation to it. Double click to view
the flow chart activity. Search for an input dialog activity in
the activities panel and drag and drop it on the start nodes down arrow in the flow
chart container to connect it to the node. Rename the activity. [MUSIC] Double click to view
the input dialog activity. In double quotes, enter the title text, vote eligibility in the dialog title. [MUSIC] And the label text,
enter your age in the input label box. [MUSIC] From the variables panel, create a variable into user age with variable type as in 32. And scope as flow chart decisions and
flow chart. Close the variables panel. Go to the properties panel of
the user input dialog activity and enter the variable into
user age in its result property, navigate back to the flow chart. Search for a flow decision
activity in the activities panel. And drag and
drop it below the input dialog activity. Rename the flow decision
activity as vote eligibility. Now navigate to the properties panel
of the flow decision activity. Click the condition fields ellipsis icon
to open the expression editor window and enter the condition into user
age greater than or equal to 18. Click OK. [MUSIC] Next insert to message box activities. Place one on the left
that is the true side and another on the right that is the false
side of the flow decision activity. [MUSIC] Rename both activities. Double click to view the first
message box activity. In the text area,
enter the text you can vote. [MUSIC] This message box will execute if
the age is greater than or equal to 18. Navigate back to the flow chart. Double click to view the second
message box activity. In the text area,
enter the text you cannot vote. This message box will execute
if the age is less than 18. Navigate back to the flow chart. [MUSIC] Save the project and run it. [MUSIC] Let's test the code with a few variations. Try entering 15 is the input and click Ok. The answer is, you cannot vote. This is because the age entered is less
than 18 as specified in the condition. Click OK. [MUSIC] Try it again by entering 20 as the input. [MUSIC] The answer is, you can vote because
the age entered is greater than 18. Click OK. The process has run successfully. It is encouraged to create the workflow
as demonstrated and try this activity. [MUSIC] Thank you for watching. [MUSIC]